﻿#include "logentry.h"

bool LogEntry::match(const QString& threadFilter, const QString& levelFilter, const QString& keyword) const
{
    if (!threadFilter.isEmpty() && !threadId.contains(threadFilter))
        return false;

    if (!levelFilter.isEmpty() && !level.contains(levelFilter, Qt::CaseInsensitive))
        return false;

    if (!keyword.isEmpty() && !content.contains(keyword, Qt::CaseInsensitive))
        return false;

    return true;
}
